package com.user.profile.dao;

import com.user.profile.entity.LabelEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LabelMapper {

  @Insert("INSERT INTO `label` (label_name , parent_operate, json) VALUES (#{labelName}, #{parentOperate}, #{json})")
  void save(@Param("labelName") String labelName,
      @Param("parentOperate") Integer parentOperate,
      @Param("json") String json);

  @Select("SELECT * FROM `label` WHERE id = #{id}")
  LabelEntity selectById(@Param("id") int id);

}
